<!DOCTYPE html>
<head>
<script type="text/javascript">
	var array = new Array(false, false, false, false);
	function init() {
		var audioIdArray = document.getElementsByTagName("audio");
   		for (var i=0; i<audioIdArray.length; i++) {
   			if (!array[i]) {
   				audioIdArray[i].play();
   				audioIdArray[i].loop = true;
   				array[i] = true;
   				break;
   			}
   		}	
   		
	}
</script>
</head>

<body>
	<button onclick="init()">play next</button>
	<audio id="1" src="media/rec01.mp3"></audio>
	<audio id="2" src="media/rec02.mp3"></audio>
	<audio id="3" src="media/rec03.mp3"></audio>
	<audio id="4" src="media/rec04.mp3"></audio>
</body>
</html>
